home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Directorty Opus 5 - Magellan
/
Opus 5 - Magellan.iso
/
Extras
/
DOPbt41
/
4
/
rexx
/
conv.lzx->lha.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-04-18
|
1KB
|
60 lines
/* $VER: 2.00 convert lzx to lha
Create a button named LZX->LHA saying
AmigaDOS rx dopus:modules/rexx/conv.lzx->lha.rexx {f}
FLAGS:
Do all files
No filename quote
Output window
Rescan source
script will delete the extracted files and
delete the original file (.lha that is)
OR use from a shell
*/
ARG file
if ~show(l,"rexxsupport.library") then
call addlib("rexxsupport.library",0,-30,0)
if file = '' then signal usage
if file = '?' then signal usage
test = right(file,3)
if test ~= 'LZX' then signal NOPE
else say 'LZX to LHA by Niels <ABC>...working on -> 'file
NewFile = Left(File,Length(file)-3)'lha'
makedir('sys:repack')
Address COMMAND 'c:assign repack: sys:repack'
Address COMMAND 'delete repack:#? all force >nil:'
Address COMMAND 'c:LZX -a -M X -F' file ' #? REPACK:'
Address COMMAND 'lha -aerlb128MY -F a ' newFile ' REPACK:#?'
Address COMMAND 'delete' file '>nil:'
Address COMMAND 'c:assign repack: remove'
Address COMMAND 'c:delete sys:repack all >nil:'
EXIT
USAGE:
say "USAGE: rx conv.lha->lzx [file].lha"
say
say
say "Will convert a single LHA-archive to LZX."
say "AND delete the original LHA file..."
say "(p) niels >ABC<"
EXIT
NOPE:
say 'I need a lzx file to work on, so'
say file
say 'will not work. Sorry !'
say
EXIT